package com.whately.core.database.common.dal.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 操作日志
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "recorder_operate")
public class RecorderOperate {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 操作人id
     */
    @TableField(value = "operator_id")
    private Long operatorId;

    /**
     * 操作人名字
     */
    @TableField(value = "operator_name")
    private String operatorName;

    /**
     * 机构id
     */
    @TableField(value = "cid")
    private Long cid;

    /**
     * 类型，扩展用
     */
    @TableField(value = "typ")
    private Integer typ;

    /**
     * 关联业务id，默认为0,
     */
    @TableField(value = "biz_id")
    private Long bizId;

    /**
     * 描述
     */
    @TableField(value = "descr")
    private String descr;

    /**
     * 操作内容，最大1000个字符
     */
    @TableField(value = "content")
    private String content;

    /**
     * 操作内容，最大1000个字符
     */
    @TableField(value = "content_before")
    private String contentBefore;

    @TableField(value = "create_time")
    private Long createTime;

    public static RecorderOperateBuilder builder() {
        return new RecorderOperateBuilder();
    }
}